import React from "react";
import NullList from '../../../common/nullList';
function SearchList(props) {
    let { CreatItem, data } = props
    const length = data.length;
    if (length > 0) {
        return( <>
            {data.map(i => {
                return (
                    <CreatItem i={i} key={Math.random()} {...props}/>
                )
            })}
        </>)
    } else {
        return <NullList />
    }
}
export default SearchList;
